<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 全局公共配置表
 */
class CreateConfigTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('config', function (Blueprint $table) {
            $table->increments('id');
            $table->string('key',100)->comment('key名');
            $table->text('vue')->nullable()->comment('key值');
            $table->tinyInteger('switch')->default(0)->comment('开关 0=关 1=开');
            $table->string('status',50)->nullable()->comment('状态');
            $table->string('type',50)->nullable()->comment('类型');
            $table->string('desc',500)->nullable()->comment('描述');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('config');
    }
}
